package com.zlm.design.combined;

/**
 * @author zlm
 * @date 2025/4/21
 */
public class Main {

    public static void main(String[] args) {
        Province province = new Province("河南省");
        City zzCity = new City("郑州市");
        District zzDistrict = new District("郑东新区", 10000);
        District zzDistrict2 = new District("金水区", 20000);
        zzCity.addDistrict(zzDistrict);
        zzCity.addDistrict(zzDistrict2);
        province.addCity(zzCity);

        City ayCity = new City("安阳市");

        District ayDistrict = new District("龙安区", 10000);
        District ayDistrict2 = new District("北关区", 10000);
        ayCity.addDistrict(ayDistrict);
        ayCity.addDistrict(ayDistrict2);
        province.addCity(ayCity);
        System.out.println(ayCity.getName()+"人口数量："+ayCity.computePopulation());
        System.out.println(zzCity.getName()+"人口数量："+zzCity.computePopulation());

    }
}
